package yz.com.javautil.date;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;

import java.util.Date;

/**
 * @author Administrator
 */
public class Hour {
    public static void main(String[] args) {
        DateTime dateTime = DateUtil.offsetHour(new Date(), -1);
        int hour = DateUtil.hour(dateTime, true);
        String timeNow = DateUtil.format(dateTime, "yyyy-MM-dd");
        String tmeMin = timeNow + " " + hour + ":00:00";
        String tmeMax = timeNow + " " + hour + ":59:59";
        System.out.println(tmeMin+"----"+tmeMax);
    }
}
